package nave.android.exemplo;

public class NAVEListActivity 
{
	String test[] = { "LifeCycleTest",
					  "SingleTouchTest",
					  "MultiTouchTest",
					  "KeyTest",
					  "AccelerometerTest",
					  "AssetsTest",
					  "ExternalStorageTest",
					  "SoundPoolTest",
					  "MediaPlayerTest",
					  "FullScreenTest",
					  "WakeLockTest",
					  "RenderViewTest",
					  "ShapeTest",
					  "BitmapTest",
					  "FontTest",
					  "SurfaceViewTest" };
	
	public void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setListAdapter(new ArrayAdapter<String>(this,
				android.R.layout.simple_list_item_1, tests));
	}
	
	@Override
	public void OnListItemClick(ListView lits, View view, int position, 
			long id)
	{
		super.onListItemClick(list, view, position, id);
		String testName = tests[position];
		try
		{
			Class<?> clazz = Class.forName("nave.android.exemplo." + testName);
			Intent intent = new Intent(this, clazz);
			startActivity(intent);
		}
		catch (ClassNotFoundException e)
		{
			e.printStackTrace();
		}
	}
}
